// //L1
// console.log("🥑 asynchronous 1")

// //L2
// setTimeout(_=>console.log("🍔 Timeout2"),0)

// //L3
// Promise.resolve().then(_=>console.log("🍍 Promise"))

// //L4

import fetch from "node-fetch";

const promise = fetch("https://jsonplaceholder.typicode.com/todos/1");

promise
  .then((response) => response.json())
  .then((user) => {
    throw new Error("uh oh");
  })
  .then((json) => console.log(json))
  .catch((err) => console.error("😥", err));

console.log("🥑 asynchronous 4");
